From: Richard M. Stallman Date: Fri, 25 Jun 1993 21:30:54 +0000 (+0000) Subject: (vc-diff): If `diff' gives empty output, return nil. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~95165 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=b246f571850419affa459113d462ceae9eadc373;p=emacs.git (vc-diff): If `diff' gives empty output, return nil. --- diff --git a/lisp/vc.el b/lisp/vc.el index ff6b8e2166b..b48e3bf07d4 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -726,8 +726,14 @@ and two version designators specifying which versions to compare." ;; visited. This plays hell with numerous assumptions in ;; the diff.el and compile.el machinery. (pop-to-buffer "*vc*") - (vc-shrink-to-fit) - (goto-char (point-min)) + (pop-to-buffer "*vc*") + (if (= 0 (buffer-size)) + (progn + (setq unchanged t) + (message "No changes to %s since latest version." file)) + (vc-shrink-to-fit) + (goto-char (point-min))) + ) (not unchanged) )